package com.souvc.xstream;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;

/**
 * 测试 Local Converters
 */
@XStreamAlias("message")
public class RendezvousMessage5 {

    @XStreamAlias("type")
    private int messageType;

    //添加 List类型的别名
    @XStreamImplicit(itemFieldName="part")
    private List<String> content;

    //添加boolean 属性
    private boolean important;

    //添加日期类型 属性
    private Calendar created = new GregorianCalendar();

    public RendezvousMessage5(int messageType, boolean important, String... content) {
        this.messageType = messageType;
        this.important = important;
        this.content = Arrays.asList(content);
    }
}
